package com.lc1993929.util;

/**
 * Created by LiuChang on 2017/5/5.
 */

import com.lc1993929.entity.ReceiveXmlEntity;
import com.lc1993929.tuling.TulingController;

/**
 * 微信流程控制类s
 */
public class WechatController {
    /**
     * 微信流程控制
     */
    public String wechatProcess(String content) {
        //解析接收到的xml数据，转为对象
        ReceiveXmlEntity xml = ParseReceiveXml.getMsgEntity(content);
        //调用图灵机器人接口处理模块，获取图灵机器人的结果
        String tlResult = new TulingController().getTulingRe(xml.getContent());
        //封装xml接口的返回数据
        String xmlResult = FormatXmlResult.getXmlResult(xml, tlResult);

        return xmlResult;
    }

}
